home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / PCI Driver Development Kit / • Tools / Development / NCR.flash / How to Burn NCR Flash ROM < prev    next >
Encoding:
Text File  |  1996-08-20  |  7.8 KB  |  202 lines  |  [TEXT/MPS ]

  1.  
  2. # Below are in order the things you need to do in MacTerminal and MPW
  3. # to burn the flash ROM on the NCR8250S card.  We'll switch back and
  4. # forth (get it!) between MPW and MacTerminal worksheets in the order
  5. # that things are done.  Below is just the dump of the sessions in order.
  6.  
  7. # Let's begin!
  8. #
  9. # Make sure your NCR 8250S card is plugged into the 2nd slot from the
  10. # CPU (known as B1 on the silkscreen, or Bus 1, device E, in Open Firmware.
  11. # The only reason this slot location is important is because the Flash program
  12. # looks for the device there.
  13. #
  14. # Open 'Open Firmware Settings' with MacTerminal.  Remember to open the connection
  15. # from the "Session" menu.  Turn on your TNT or Tsunami and hold the NMI and RESET
  16. # buttons together.  Then release the RESET button, while still holding NMI.  Then
  17. # release NMI.  You should be in the Open Firmware User Interface (OF UI) now with
  18. # your MacTerminal Session.
  19.  
  20.  
  21. # MPW session to create flash_image.txt
  22. #
  23. # Copy CForth93, tokenizer.dic, and NCR.of into your working directory.  Also
  24. # copy the makecreate script into your working directory.
  25. #
  26. # When you start MPW, set the current directory to your working directory.
  27. #
  28.  
  29. #---------- commands to tokenize NCR.of
  30. # Select and enter the first line, which will enter you into
  31. # cforth93 environment.  You're doing Forth stuff, then!
  32. # Select each line individually and press <enter> on the numeric keypad.
  33.  
  34. cforth93 tokenizer.dic
  35.  
  36. \ now we're in a Forth environment, so comments start
  37. \ with "\ " (remember to put a space after "\")
  38.  
  39. \ let's tokenize our Forth code
  40. tokenize NCR.of
  41.  
  42. \ dump-create doesn't work right yet, but if
  43. \ it did, use the line below in place of the save-image line:
  44.  
  45. \ dump-create flash_image.txt
  46. save-image flash_image.bin
  47.  
  48. \ after typing bye, you'll exit cforth93 and be back in MPW
  49. bye
  50.  
  51.  
  52. #---------- convert binary image to "create" format for downloading to Open Firmware
  53. makecreate flash_image.bin flash_image.txt
  54. # The makecreate script is crude and slow, but it works for usual cases
  55.  
  56. # now flash_image.txt is ready to be downloaded to Open Firmware
  57.  
  58. # MacTerminal Session
  59. Open Firmware, 0.99a ok
  60. 0 > \ Let's look at the device tree to make sure we find  ok
  61. 0 > \ the NCR card.  ok
  62. 0 > dev / ls
  63. FFB20190: /chosen@0,0
  64. FFB202B0: /cpu0@0,0
  65. FFB204D8: /system-memory@0
  66. FFB205B8: /openprom@0,0
  67. FFB20670: /mac-rom@0,0
  68. FFB206F8: /options@0,0
  69. FFB20A58: /aliases@0,0
  70. FFB20B90: /packages@0,0
  71. FFB20BF0:   /deblocker@0,0
  72. FFB20C50:   /disk-label@0,0
  73. FFB20CB0: /bandit@F2000000
  74. FFB20E90:   /gc@10
  75. FFB21118:     /53c94@10000
  76. FFB211C8:       /sd@0,0
  77. FFB21278:     /mesh@18000
  78. FFB21328:       /sd@0,0
  79. FFB213D0:     /mace@11000
  80. FFB214A8:     /escc@13020
  81. FFB21580:     /escc@13000
  82. FFB21658:     /awac@14000
  83. FFB21730:     /swim3@15000
  84. FFB21808:     /via-cuda@16000
  85. FFB218D0:       /adb@0,0
  86. FFB21950:         /keyboard@0,0
  87. FFB219F8:         /mouse@1,0
  88. FFB21AA0:       /pram@0,0
  89. FFB21B48:       /rtc@0,0
  90. FFB21BE8:       /power-mgt@0,0
  91. FFB21E40:   /AAPL,NCR8250S@E
  92. FFB21C90: /kaos@F0000000
  93. FFB22158:   /control@B
  94. FFB22360:   /planb@D
  95.  ok
  96. 0 > \ You notice that AAPL,NCR8250S@E is there.  This card had  ok
  97. 0 > \ been programmed before.  If it was a blank Flash ROM  ok
  98. 0 > \ it would appear as pci1000,3@E.
  99. 0 > \
  100. 0 > \ IMPORTANT: The current version of the NCR-FLASH.of program
  101. 0 > \ assumes that your NCR card is in slot E, i.e., the 2nd PCI
  102. 0 > \ slot out from the processor card.
  103. 0 > \
  104. 0 > \ Now let's get back to the root level, so we can download.
  105. 0 > dev ..  ok
  106. 0 > \ Now let's download the program NCR-FLASH.of.  We'll type  ok
  107. 0 > \ dl <return> and OF will be waiting for the download.  You  ok
  108. 0 > \ can use either Send File or copy and paste at this point  ok
  109. 0 > \ to download.  Remember to type ctrl-d to end the download ok
  110. 0 > dl  ok
  111. 0 > \ now let's download flash_image.txt.  You should have already  ok
  112. 0 > \ run the tokenizer from MPW on NCR.of to get flash_image.bin  ok
  113. 0 > \ and then used the MPW script to make flash_image.txt.  If   ok
  114. 0 > \ you haven't done that yet, do so now in MPW.  ok
  115.  
  116. 0 > \ it'll take a while to copy, then paste.  And, after you hit  ok
  117. 0 > \ ctrl-d, there'll be a long pause, since the file is  ok
  118. 0 > \ pretty large.  ok
  119. 0 > dl  ok
  120. 2 >   ok
  121. 2 > \ At this point, the address and length of your downloaded image   ok
  122. 2 > \ should be on the stack, ready for the nv-flash command  ok
  123. 2 > \ 
  124. 2 > \ If you want to look at the image that was downloaded,  ok
  125. 2 > \ you can try the following command to see the first $100   ok
  126. 2 > \ bytes:  ok
  127. 2 > over 100 dump
  128. FFB667A4: 55 AA 40 00 00 00 00 00 00 00 00 00 00 00 00 00
  129. FFB667B4: 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00
  130. FFB667C4: 50 43 49 52 00 10 03 00 00 00 20 00 00 00 00 01
  131. FFB667D4: 1D 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00
  132. FFB667E4: F1 08 01 54 00 00 38 77 12 0D 41 41 50 4C 2C 4E
  133. FFB667F4: 43 52 38 32 35 30 53 02 01 12 04 73 63 73 69 01
  134. FFB66804: 1A 12 05 38 32 35 30 53 01 19 A5 A5 01 03 01 13
  135. FFB66814: A5 01 11 A5 01 11 01 12 01 12 A5 A5 01 03 10 01
  136. FFB66824: 00 00 10 24 01 13 A5 01 11 10 00 00 01 00 01 11
  137. FFB66834: 01 12 01 12 A5 A5 01 03 10 02 00 00 14 24 01 13
  138. FFB66844: A5 01 11 10 00 00 01 00 01 11 01 12 01 12 01 12
  139. FFB66854: 12 03 72 65 67 01 10 A5 01 11 A5 01 11 01 12 10
  140. FFB66864: 00 72 70 E0 01 11 10 00 72 70 E0 01 11 01 12 01
  141. FFB66874: 12 A5 01 11 A5 01 11 01 12 01 12 10 00 7B 98 A0
  142. FFB66884: 01 11 10 00 7B 98 A0 01 11 01 12 01 12 12 11 70
  143. FFB66894: 6F 77 65 72 2D 63 6F 6E 73 75 6D 70 74 69 6F 6E ok
  144. 2 > \ now let's erase the flash ROM.  ok
  145. 2 > nv-erase  ok
  146. 2 > \ to see that it worked, let's dump a few locations  ok
  147. 2 > 8fff8000 100 dump
  148. 8FFF8000: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  149. 8FFF8010: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  150. 8FFF8020: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  151. 8FFF8030: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  152. 8FFF8040: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  153. 8FFF8050: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  154. 8FFF8060: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  155. 8FFF8070: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  156. 8FFF8080: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  157. 8FFF8090: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  158. 8FFF80A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  159. 8FFF80B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  160. 8FFF80C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  161. 8FFF80D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  162. 8FFF80E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
  163. 8FFF80F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ok
  164. 2 > \ that looks pretty erased to me!  ok
  165. 2 >   ok
  166. 2 > \ now let's program the flash  ok
  167. 2 > nv-flash  ok
  168. 0 > \ The 2 items that were on the stack should be gone now.  ok
  169. 0 > \ We should see our program in the ROM now:  ok
  170. 0 > 8fff8000 100 dump
  171. 8FFF8000: 55 AA 40 00 00 00 00 00 00 00 00 00 00 00 00 00
  172. 8FFF8010: 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00
  173. 8FFF8020: 50 43 49 52 00 10 03 00 00 00 20 00 00 00 00 01
  174. 8FFF8030: 1D 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00
  175. 8FFF8040: F1 08 01 54 00 00 38 77 12 0D 41 41 50 4C 2C 4E
  176. 8FFF8050: 43 52 38 32 35 30 53 02 01 12 04 73 63 73 69 01
  177. 8FFF8060: 1A 12 05 38 32 35 30 53 01 19 A5 A5 01 03 01 13
  178. 8FFF8070: A5 01 11 A5 01 11 01 12 01 12 A5 A5 01 03 10 01
  179. 8FFF8080: 00 00 10 24 01 13 A5 01 11 10 00 00 01 00 01 11
  180. 8FFF8090: 01 12 01 12 A5 A5 01 03 10 02 00 00 14 24 01 13
  181. 8FFF80A0: A5 01 11 10 00 00 01 00 01 11 01 12 01 12 01 12
  182. 8FFF80B0: 12 03 72 65 67 01 10 A5 01 11 A5 01 11 01 12 10
  183. 8FFF80C0: 00 72 70 E0 01 11 10 00 72 70 E0 01 11 01 12 01
  184. 8FFF80D0: 12 A5 01 11 A5 01 11 01 12 01 12 10 00 7B 98 A0
  185. 8FFF80E0: 01 11 10 00 7B 98 A0 01 11 01 12 01 12 12 11 70
  186. 8FFF80F0: 6F 77 65 72 2D 63 6F 6E 73 75 6D 70 74 69 6F 6E ok
  187. 0 > \ That's it.  Now when you boot, you can use the  ok
  188. 0 > \ Display Name Registry tool to see that the driver  ok
  189. 0 > \ is actually loaded.  ok
  190. 0 > boot
  191.  
  192. # MacTerminal commands without comments or output:
  193. dev / ls
  194. dev ..
  195. dl
  196. dl
  197. nv-erase
  198. 8fff8000 100 dump
  199. nv-flash
  200. 8fff8000 100 dump
  201. boot
  202.